package com.iweb.day12;

/**
 * @author WuYongheng
 * @date 2021/12/5
 * @description 演示线程状态
 */
public class StateTest implements Runnable{
    public void run() {
        try {
            System.out.println("线程t在运行！");
            Thread.sleep(500);
            System.out.println("线程t在短时间睡眠后重新运行！");
        } catch (InterruptedException IE) {
            System.out.println("线程被中断");
        }
    }
    public static void main(String args[]) {
        Thread t=new Thread(new MyThread3());
        System.out.println ("线程 t 为新建！");
        t.start();
        System.out.println ("线程 t 为就绪！");
    }
    }

